package com.qfedu.hotelssm.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author truman
 * @date 2022/8/28
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Employee {
    @ExcelIgnore
    private Integer id;//员工编号
    @ExcelProperty(value = "姓名")
    private String name;//姓名
    @ExcelProperty(value = "性别")
    private Integer sex;//性别， 1 男、2 女
    @com.alibaba.excel.annotation.format.DateTimeFormat(value = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ExcelProperty(value = "出生日期")
    private Date birthday;//出生日期
    @ExcelProperty(value = "联系方式")
    private String phone;//联系方式
    @ExcelProperty(value = "地址")
    private String address;//地址
    @ExcelProperty(value = "岗位编号")
    private Integer jid;//岗位编号
    @ExcelProperty(value = "部门编号")
    private Integer did;//部门编号
    @ExcelIgnore
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date ctime;//入职时间
}
